what is a server and how does it work